@extends('layout.home.master')
@section('content')
    <div class="container mt-5">
        <div class="row">
            <div class="col-12 col-xl-3">
                @include('layout.infor.menu')
            </div>

            <div class="col-12 col-xl-9">
                <form action="{{route('info.user.update',auth()->user())}}" method="post">
                    @csrf @method('PUT')
                <div class="card">
                    <div class="card-header">
                        修改密码
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label for="">新密码</label>
                            <input type="password" name="password" id="" value="" class="form-control" placeholder="" aria-describedby="helpId">
                        </div>
                        <div class="form-group">
                            <label for="">确认新密码</label>
                            <input type="password" name="password_confirmation" id="" value="" class="form-control" placeholder="" aria-describedby="helpId">
                        </div>
                    </div>

                    <div class="card-footer text-muted">
                        <button type="submit" class="btn btn-primary">提交</button>
                    </div>
                </div>
                </form>
            </div>
        </div> <!-- / .row -->
    </div>
    <script>
        function upImagePc() {
            require(['hdjs'], function (hdjs) {
                var options = {
                    multiple: false,//是否允许多图上传
                    //data是向后台服务器提交的POST数据
                    // data: {name: '后盾人', year: 2099},
                };
                hdjs.image(function (images) {
                    //上传成功的图片，数组类型
                    $("[name='icon']").val(images[0]);
                    $(".avatar img").attr('src', images[0]);
                    $('#uploadImage').submit();
                }, options)
            });
        }
    </script>
@endsection
